<?
class Error{
	static $instance;
	protected $errors;
	protected $nb;
	private function __construct(){
		$this->errors="";
		$this->nb=0;
	}
	static function getInstance(){
		if(empty(self::$instance)){
			self::$instance=new Error();
		}
		return self::$instance;
	}
	public function length(){
		return $this->nb;
	}
	public function getErrors(){
		return $this->errors;
	}
	public function append($txt){
		$this->nb++;
		$this->errors="[Error:".$txt."]";
	}

}
?>
